package com.bilibili.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bilibili.entity.CommonResult;
import com.bilibili.entity.User;

@SuppressWarnings("serial")
@WebServlet("/administorInfo")
public class AdministorInfoServlet extends HttpServlet {
	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		response.setContentType("application/json; charset=utf-8");
		User user = (User)request.getSession().getAttribute("adminUser");
		CommonResult cr =new CommonResult();
		cr.setData(user);
		response.getWriter().write(cr.toJSONString());
	}

}
